#include <iostream>
using namespace std;

int factorial(int n)
{	
	return n <= 1 ? n : n * factorial(n - 1);
}

int fibonacci(int n)
{
	return n <= 1 ? n : fibonacci(n - 1) + fibonacci(n - 2);
}

int main(int argc, char **argv)
{
	int n;
	
	if (argc < 2) {
		cout << "usage: " << argv[0] << " N" << endl;
		return 1;
	}
	n = atoi(argv[1]);
	if (n < 0)
		cout << "N must be positive." << endl;

	cout << "Factorial(" << n << ") = " << factorial(n) << endl;
	cout << "Fibonacci(" << n << ") = " << fibonacci(n) << endl;
	
	return 0;
}
